﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace DataAccess_Layer
{
    public  class Search_Product_DAC
    {
        DataClasses_RetailerDataContext context = DataAccessHelper.DB;

        public DataTable  SearchPrice(float giatu,float giaden)
        {
            return HelperFunctions.ToDataTable(context.SP_Search_Price(giatu, giaden));
        }
        public DataTable SearchTacGia(string x)
        {
            return HelperFunctions.ToDataTable(context.SP_Search_TacGia(x));
        }
        public DataTable SearchTenSP(string x)
        {
            var az = context.SP_Search_TenSP(x);
            return HelperFunctions.ToDataTable(az);
        }
        public DataTable SearchLoaiSP(int x)
        {
            return HelperFunctions.ToDataTable(context.SP_Search_LoaiSP(x));
        }
        public DataTable SearchALL(float giatu, float giaden, string tensp, string tentacgia, int loaisp)
        {
            return HelperFunctions.ToDataTable(context.SP_Search_All(giatu, giaden, tensp, loaisp, tentacgia));
        }
    }
}
